/*
 * @Author:
 * @Date: 2017/4/17
 * @Last Modified by:
 * @Last Modified time:2017/4/17
 */
import Vue from 'vue'
import Router from 'vue-router'
import User from '@/components/admin/user'
import Main from '@/components/admin/userInfo'
import Article from '@/components/admin/articleApp'
import ArticleType from '@/components/admin/articleTypeList'
import AddArticle from '@/components/admin/addArticle'
import  Discuss from '@/components/admin/discuss'
Vue.use( Router );

export default new Router( {
  routes: [
    { path: '/', redirect: { name: 'main' } },
    {
      path: '/main',
      name: 'main',
      component: Main
    },
    {
      path: '/user',
      name: 'user',
      component: User
    }, {
      path: '/discuss',
      name: 'discuss',
      component: Discuss
    },
    {
      path: '/article',
      name: 'article',
      component: Article,
      children: [
        { path: '', component: ArticleType },
        {
          path: 'addArticle',
          component: AddArticle
        }
      ]
    }

  ]
} )
